//
//  CommonLoading.m
//  lv678
//
//  Created by apple on 15/8/20.
//  Copyright (c) 2015年 lampshade. All rights reserved.
//  

#import "CommonLoading.h"
#import "SelectCabinSheet.h"
@interface CommonLoading()

@property (nonatomic, strong)UIView *refreshView;

@end

@implementation CommonLoading

#pragma mark - 封装控件方法
- (UIView *)loadingView:(UIView *)view{
    self.refreshView = view;
    CGRect rect = _refreshView.frame;
    rect.origin.x = 30.0f;
    rect.origin.y = 200.f;
    _refreshView.frame = rect;
    return _refreshView;

}

#pragma mark - 封装刷新控件
- (UIView *)refreshLoading{
    UIView *view = [[NSBundle mainBundle]loadNibNamed:@"LoadingData" owner:self options:nil][0];
    return [self loadingView:view];
}

#pragma mark - 封装登陆控件
- (UIView *)loginLoading{
    UIView *view = [[NSBundle mainBundle]loadNibNamed:@"LoadingData" owner:self options:nil][1];
    return [self loadingView:view];
}

#pragma mark - 封装网络错误控件
- (UIView *)networkError{
    UIView *view = [[NSBundle mainBundle]loadNibNamed:@"LoadingData" owner:self options:nil][2];
    return [self loadingView:view];
}

#pragma mark - 封装查询结果无内容控件
- (UIView *)noDataTips{
    UIView *view = [[NSBundle mainBundle]loadNibNamed:@"LoadingData" owner:self options:nil][3];
    return [self loadingView:view];
}

+ (id)initCommonLoading{
    CommonLoading *loading = [[CommonLoading alloc]init];
    return loading;
}
@end
